package com.hummingbird.portal.service;

import com.hummingbird.portal.dto.RegisterDTO;
import com.hummingbird.portal.pojo.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hummingbird.portal.vo.UserVO;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author -1E18
 * @since 2024-09-22
 */
public interface IUserService extends IService<User> {
    /**
     *
     * @param username 用户名
     * @return  给security使用的
     */
    UserDetails getUserDetails(String username);

    void registerStudent(RegisterDTO registerDTO);

    List<User> getMasters();

    Map<String, User> getMastersMap();  // 昵称为 key  对象为 value

    int countCollectionsByUserId(Integer id);

    UserVO getCurrentUserVO(String username);
}
